var ShuffleBoardLayer = cc.Layer.extend({
    ctor:function() {
        this._super();
		
		
		cc.AudioEngine.getInstance().setEffectsVolume(30);
	    cc.AudioEngine.getInstance().setBackgroundMusicVolume(0.5);
		
		//cc.AudioEngine.getInstance().playBackgroundMusic("Res/background",true);
		
		var layer1 = cc.Layer.create();
        var s = cc.Director.getInstance().getWinSize();
        var screenSize = cc.Director.getInstance().getWinSize();
        var fondo = cc.Sprite.create(s_pathBackground1);
        //fondo.setScale(1.2);
        fondo.setAnchorPoint(cc.p(0, 0));   //
        fondo.setPosition(cc.p(0, 65));

        //Creamos la imagen de fondo para los scores de los jugadores
        var score = cc.Sprite.create(s_pathBackgroundScore);
        score.setAnchorPoint(cc.p(0, 1));
        score.setPosition(cc.p(0, s.height));

        //creo una capa con la Mesa (box2d)
        var layerMesa = new MesaLayer();
        layer1.addChild(fondo);         //agrego el fondo, o sea el dibujo de la mesa
        layer1.addChild(score);         //agrego el fonde de los scores
        this.addChild(layer1);          //agrego la layer con ambos fondos
        this.addChild(layerMesa);       //agrego la layer de la mesa misma (box2d)
        return true;
    }
});

ShuffleBoardScene = MainScene.extend({
    runThisTest:function () {
        var layer = new ShuffleBoardLayer();
        this.addChild(layer);
        cc.Director.getInstance().replaceScene(this);
    }
});